package com.fulu.game.bi.entity.enums;

import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 用户状态枚举
 */
@Getter
@AllArgsConstructor
public enum UserStatus {
    /**失效 */
    DISABLE(0,"失效"),
    /**启用 */
    ENABLE(1,"启用");

    private Integer type;
    private String msg;

    public UserStatus parse (Integer type) {
        for(UserStatus e :  UserStatus.values()){
            if(Objects.equals(e.getType(),type)){
                return e;
            }
        }
        return null;
    }
}
